<template>
	<view class="bigView">
		<z-paging ref="paging" :show-default-loading-more-text="false" v-model="dataList" @query="queryList">
			<navBar slot="top" title="嘉人报到" />
			<!-- <view class="jiarenItem" v-for="(item,index) in dataList" :key="index">
				<view class="title">{{item.theme}}</view>
				<u-parse class="content" :content="item.content" :lazyLoad="true"></u-parse>
			</view> -->
			<view class="itemView" v-for="(item, index) in dataList" :key="index" @click="itemHandle(item)">
				<view class="itemTitle">
					<view style="color: #000000;font-size: 16px;font-weight: bold;">{{item.theme}}</view>
				</view>
				<text style="font-size: 12px;color: #999999;padding-left: 10px;margin-bottom: 8px;">{{item.createdAtView}}</text>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import navBar from "@/components/nav_bar.vue"
	import jiaRenReport from '@/api/jiaRenReport.js'
	export default{
		components:{
			navBar
		},
		data(){
			return {
				bottom:0,
				dataList:[]
			}
		},
		mounted() {
			uni.getSystemInfo({success: (e) => {
				// this.StatusBar = e.statusBarHeight;
				let custom = wx.getMenuButtonBoundingClientRect();
				this.bottom = custom.bottom;
				// this.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
				// this.TopHeight = this.CustomBar+100;//this.StatusBar+this.CustomBar;
			}})
		},
		methods:{
			scrolltolower() {
				// this.loadmore()
			},
			sureHandle(){
				uni.navigateBack()
			},
			itemHandle(item){
				uni.navigateTo({
					url: '/packageHome/pages/carbonNeutrality/detail?id='+item.id+"&sourceType=2"
				})
			},
			queryList(pageNo, pageSize) {
				jiaRenReport.listHandle({page:pageNo,size:pageSize}).then(res =>{
					let records = res.records;
					if(pageNo==1){
						this.dataList = records;
					}else{
						this.dataList.concat(records)
					}
					this.$refs.paging.complete(res.records);
				}).catch(error =>{
					this.$refs.paging.complete(false);
				})
			}
		},
		onReady() {
			
		}
	}
</script>

<style lang="scss" scoped>
.bigView{
	width: 100vw;
	height: 100vh;
	background-color: #F7F7F7;
	display: flex;
	flex-direction: column;
}
.itemView{
	display: flex;
	flex-direction: column;
	width: 100vw;
	width: calc(100vw - 32px);
	border-radius: 12px;
	margin-left: 16px;
	// padding: 12px;
	background-color: white;
	margin-top: 8px;
	.itemTitle{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 12px;
	}
	.itemContent{
		padding: 0 12px 12px 12px;
		// font-size: 12px;
	}
}
.jiarenItem{
	display: flex;
	flex-direction: column;
	width: calc(100vw - 32px);
	border-radius: 12px;
	background-color: white;
	margin-left: 16px;
	margin-top: 8px;
	.title{
		color: #000000;
		font-size: 16px;
		height: 54px;
		border-bottom: #F7F7F7 solid 0.5px;
		width: 100%;
		display: flex;
		align-items: center;
		margin-left: 16px;
		// background-color: white;
	}
	.content{
		display: flex;
		width: 100%;
		padding: 16px;
		// background-color: red;
		margin-right: 16px;
		box-sizing: border-box; 
		line-height: 1.5;
	}
}
</style>